package com.eastedu.report.common.model.po;

import com.baomidou.mybatisplus.annotation.TableName;
import com.eastedu.common.domain.BaseAutoIdEntity;
import com.eastedu.common.enums.DateCodeType;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 报告导出任务
 *
 * @author luozhenzhong
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Entity
@Table(name = "t_report_export_task")
@TableName("t_report_export_task")
public class ReportExportTaskPO extends BaseAutoIdEntity {

    @Column(name = "`task_id`", columnDefinition = "varchar(20) comment '任务ID'", nullable = false, updatable = false)
    private String taskId;

    @Column(name = "`school_group_id`", columnDefinition = "bigint comment '校级ID'", nullable = false)
    private Long schoolGroupId;

    @Column(name = "`school_guid`", columnDefinition = "varchar(68) comment '学校GUID'", nullable = false)
    private String schoolGuid;

    @Column(name = "`section_code`", columnDefinition = "varchar(2) comment '学段'", nullable = false)
    private String sectionCode;

    @Column(name = "`school_name`", columnDefinition = "varchar(50) comment '学校名称'")
    private String schoolName;

    @Column(name = "`code_type`", columnDefinition = "varchar(10) comment '时间类型'", nullable = false)
    private DateCodeType codeType;

    @Column(name = "`date_code`", columnDefinition = "int  comment '时间值'", nullable = false)
    private Integer dateCode;

    @Column(name = "`state`", columnDefinition = "tinyint default 0 comment '状态，-1失败，0未开始，1进行中，2成功'")
    private Integer state;

    @Column(name = "`content`", columnDefinition = "text comment '报告内容'")
    private String content;
}
